package com.xinyan.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.xinyan.pojo.SprayAdmin;
import com.xinyan.mapper.SprayAdminMapper;
import com.xinyan.service.ISprayAdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 管理员表 服务实现类
 * </p>
 *
 * @author xzlf
 * @since 2024-03-26 16:37:02
 */
@Service
public class SprayAdminServiceImpl extends ServiceImpl<SprayAdminMapper, SprayAdmin> implements ISprayAdminService {
    @Override
    public SprayAdmin adminLongin(SprayAdmin sprayAdmin) {
        SprayAdmin admin = getOne(new LambdaQueryWrapper<SprayAdmin>().eq(SprayAdmin::getUsername, sprayAdmin.getUsername())
                .eq(SprayAdmin::getPwd, sprayAdmin.getPwd()));
        return admin;
    }
}
